/*
 * mox_threads.h
 *
 *  Created on: Jun 4, 2010
 *      Author: Jason Monk
 */

#ifndef MOX_THREADS_H_
#define MOX_THREADS_H_

#include <xccompat.h>

unsigned thd_std_start(chanend mox, mox_msg thd_info);

/*
typedef enum {
	TH_MSG=0x600,
	TH_REQ_TYPE,
	TH_TYPE_MOD,
	TH_TYPE_APP,
	TH_TYPE_MOX,
	TH_REQ_THD,
	TH_SET_ID,
	TH_RELEASE,
	TH_ACK,
	TH_NACK,
	TH_PARAM,
	TH_REQ_COM,
	TH_END_COM,
	TH_START_MOD,
	TH_START_APP,
	TH_REQ_CFG,
	TH_SET_CFG,
	TH_CON_REQ,
	TH_DIS_REQ,
	TH_LST_REQ,
	TH_DTL_REQ
} th_msg_t;
*/


void thread_exit(void);;
void thd_comm_msg_send(schanend mox, mox_msg msg);
void thd_comm_msg_recv_ref(schanend mox, mox_msg msg);

#ifndef __XC__
int thread_create(void *func, chanend mod,
		int *stack, int *const_ptr, int *data_ptr, int i);
mox_msg *thd_comm_msg_recv(schanend mox);
mox_msg *thd_comm_msg_recv_nblock(schanend mox);
#endif

#endif /* MOX_THREADS_H_ */
